<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Laravel</title>
    <link rel="stylesheet" href="/js/layui/css/layui.css">
    <link rel="stylesheet" href="/css/index.css">
    <link rel="stylesheet" href="/css/reset.css">
</head>
<body  class="main ">
<div id="particles-js" class="main ">
    <div class="main_alert">
        <h1>随访统计明细</h1>
        <div class="layui-form">
            <div class="layui-input-inline">
                <input class="layui-input" name="keyworld" value="{{$keyworld}}" placeholder="请输入关键字">
            </div>
            <div class="layui-input-inline">
                <button class="layui-btn layui-btn-primary layui-bg-white layui-border" lay-submit lay-filter="filter"><i class="layui-icon layui-icon-search"></i></button>
            </div>
        </div>
        <table class="layui-table" lay-skin="row" lay-size="lg">
            <colgroup>
                <col>
                <col>
                <col>
                <col>
                <col>
            </colgroup>
            <thead>
            <tr>
                <th>ID</th>
                <th>医护室名称</th>
                <th>医护室负责人</th>
                <th>科室</th>
                <th>今日是否随访</th>
            </tr>
            </thead>
            <tbody>

            @foreach ($data as $user)
                <tr>
                    <td>{{ $user->id }}</td>
                    <td>{{ $user->work_name }}</td>
                    <td>{{ $user->real_name }}</td>
                    <td>{{ $user->classify_name }}<br/>
                    <td>{{ $user->follow }}</td>
                </tr>
            @endforeach
            </tbody>
        </table>
        <div id="page">{{ $data->links() }}</div>
    </div>
</div>
<script src="/js/jquery.min.js"></script>
<script src="/js/layui/layui.js"></script>
<script>
    // 弹窗
    layui.use(function() {
        var form = layui.form, layer = layui.layer;
        form.render()

        form.on('submit(filter)', function (data){
            console.log(data)
            if(!data.field.keyworld){
                layer.msg('请输入关键字')
                return false
            }
            location.href = '/admin/getworkfollowlist?page=1&keyworld='+data.field.keyworld
        });
    })
</script>
</body>
</html>
